﻿using Comm100.Framework.Domain.Services;
using Bot.Domain.Bo;
using Bot.Domain.Entities;
using System;
using System.Collections.Generic;
using System.Text;
using Bot.Domain.BotImport;
using Bot.Domain.Bot;

namespace Bot.Domain.Interfaces
{
    public interface IIntentDomainService : IDomainService
    {
        Intent Create(Guid botId, Intent intent);

        Intent Get(Guid id,string include = "");

        Intent Update(IntentUpdateBo id);

        IEnumerable<Intent> List(Guid botId, string include, Guid? categoryId, string keyword);

        void Delete(Guid id);
        
        Intent GetByName(Guid botId,string name);

        List<Intent> GetByCategoryIds(List<Guid> categoryIds);
        List<Intent> GetByCategoryId(Guid categoryId, string include= "");
        /// <summary>
        /// 导入
        /// </summary>
        /// <param name="headGuid"></param>
        /// <param name="filePath"></param>
        /// <param name="bot"></param>
        /// <param name="mode"></param>
        /// <returns></returns>
        Operation Import(Guid jobId, string filePath, Chatbot bot, EnumImportMode mode);
        List<IntentScore> QueryTopScore(Guid botId, string question, int top = 10);
        /// <summary>
        /// query intent
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="detectIntentRequestBody"></param>
        /// <returns></returns>
        DetectIntentResponse DetectIntent(Guid sessionId, DetectIntentRequestBody detectIntentRequestBody);
        /// <summary>
        /// goto intent
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="triggerAnIntentRequestBody"></param>
        /// <returns></returns>
        TriggerAnIntentResponse TriggerAnIntent(Guid sessionId, TriggerAnIntentRequestBody triggerAnIntentRequestBody);
        /// <summary>
        /// via form
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="submitFormRequestBodyDto"></param>
        /// <returns></returns>
        HighConfidenceAnswer SubmitForm(Guid sessionId, SubmitFormRequestBody submitFormRequestBodyDto);
        /// <summary>
        /// authentication
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="submitAuthenticationRequestBody"></param>
        /// <returns></returns>
        HighConfidenceAnswer SubmitAuthentication(Guid sessionId, SubmitAuthenticationRequestBody submitAuthenticationRequestBody);
        /// <summary>
        /// location
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="submitLocationRequestBody"></param>
        /// <returns></returns>
        HighConfidenceAnswer SubmitLocation(Guid sessionId, SubmitLocationRequestBody submitLocationRequestBody);
        /// <summary>
        /// rate
        /// </summary>
        /// <param name="sessionId"></param>
        /// <param name="rateRequestBody"></param>
        /// <returns></returns>
        NotHelpfulAnswer Rate(Guid sessionId, RateRequestBody rateRequestBody);
        IEnumerable<AnswerInChannelPrompt> GetPromptsByIntentId(Guid intentId);
        IEnumerable<Response> GetResponsesByIntentId(Guid intentId);
        bool NameCheck(Guid botId, string name);
    }
}
